<template>
	<view class="headPortrait">
		<view class="img">
			<image :src="imgUrl" mode="" @click="common.previewD(imgUrl)"></image>
		</view>
		<view class="petName">
			<view class="title">{{ name }}</view>
			<view class="describe">{{ describe }}</view>
		</view>
		<view class="funct">
			<slot name="right"></slot>
		</view>
	</view>
</template>

<script>
	export default {
		components: {

		},
		name: "headPortrait",
		data() {
			return {

			}
		},
		props: {
			// 头像地址
			imgUrl: {
				typeof: String,
				default: "",
			},
			// 昵称
			name: {
				typeof: String,
				default: "我是一个昵称"
			},
			// 描述
			describe: {
				typeof: String,
				default: "",
			}
		},
		methods: {

		}
	}
</script>

<style lang="less" scoped>
	.headPortrait {
		padding: 12px 15px;
		display: flex;
		box-sizing: border-box;
		justify-content: space-around;
		align-items: center;

		.img {
			width: 44px;
			height: 44px;
			border-radius: 50%;
			overflow: hidden;

			image {
				width: 100%;
				height: 100%;
			}
		}

		.petName {
			box-sizing: border-box;
			width: calc(100% - 50px - 60px);

			.title {
				font-size: 16px;
				font-weight: bold;
				white-space: nowrap;
				text-overflow: ellipsis;
				overflow: hidden;
			}

			.describe {
				font-size: 14px;
				color: #757575;
				white-space: nowrap;
				text-overflow: ellipsis;
				overflow: hidden;
			}
		}

		.funct {
			width: 55px;
			box-sizing: border-box;
		}
	}
</style>